﻿using System.Collections.Generic;
using System.Configuration;

namespace MLSMooc.Helper
{
    public static class ConstantHelper
    {
        //Session中的USER常量键
        public static readonly string USER = "_User_";
        //Session中的AREA常量
        public static readonly string AREA = "_AREA_";
        //Session中的CTRLER常量
        public static readonly string CTRLER = "_CTRLER_";
        //Session中的ACTION常量
        public static readonly string ACTION = "_ACTION_";
        //超级密码
        public static readonly string SUPER_PWD = "!spsuperpwd#";

        //店面文件夹
        public static readonly string STORE_IMAGE_FOLDER = "StoreImage";


        //config中的虚拟路径常量
        public static readonly string VIRTUAL_PATH = ConfigurationManager.AppSettings["VirtualPath"].Trim().Equals("null") ? string.Empty : ConfigurationManager.AppSettings["VirtualPath"].Trim();
        ////OfflineTime
        //public static readonly int OFFLINE_TIME = ConfigurationManager.AppSettings["OfflineTime"] == null ? 00 : int.Parse(ConfigurationManager.AppSettings["OfflineTime"].Trim());
        ////OnlineTime
        //public static readonly int ONLINE_TIME = ConfigurationManager.AppSettings["OnlineTime"] == null ? 06 : int.Parse(ConfigurationManager.AppSettings["OnlineTime"].Trim());

        public static readonly string STORE_BIZ = "1,2,3,4,5,6,100";

        #region FSS Pipeline 订单状态枚举设置不了，就写在这里
        /// <summary>
        /// 订单状态
        /// </summary>
        public static List<KeyValuePair<string, string>> PipelineOrderCreateStatus()
        {
            return new List<KeyValuePair<string, string>>()
            {
                new KeyValuePair<string, string>("10%","10%"),
                new KeyValuePair<string, string>("30%","30%"),
                new KeyValuePair<string, string>("60%","60%"),
                new KeyValuePair<string, string>("90%","90%")
            };
        }

        public static List<KeyValuePair<string, string>> PipelineOrderUpdateStatus()
        {
            return new List<KeyValuePair<string, string>>()
            {
                new KeyValuePair<string, string>("10%","10%"),
                new KeyValuePair<string, string>("30%","30%"),
                new KeyValuePair<string, string>("60%","60%"),
                new KeyValuePair<string, string>("90%","90%"),
                new KeyValuePair<string, string>("won","won"),
                new KeyValuePair<string, string>("lost","lost"),
                new KeyValuePair<string, string>("cancel","cancel")
            };
        }

        public static List<KeyValuePair<string, string>> PipelineDtsIsDtd()
        {
            return new List<KeyValuePair<string, string>>()
            {
                new KeyValuePair<string, string>("是","是"),
                new KeyValuePair<string, string>("否","否")
            };
        }

        public static List<KeyValuePair<string, string>> PipelineDtsMemorySize()
        {
            return new List<KeyValuePair<string, string>>()
            {
                new KeyValuePair<string, string>("8G","8G"),
                new KeyValuePair<string, string>("16G","16G"),
                new KeyValuePair<string, string>("32G","32G")
            };
        }

        public static List<KeyValuePair<string, string>> PipelineDtsHardDisk()
        {
            return new List<KeyValuePair<string, string>>()
            {
                new KeyValuePair<string, string>("无盘","无盘"),
                new KeyValuePair<string, string>("SSD","SSD"),
                new KeyValuePair<string, string>("傲腾16G","傲腾16G"),
                new KeyValuePair<string, string>("傲腾32G","傲腾32G")
            };
        }

        public static List<KeyValuePair<string, string>> PipelineMonitorBrand()
        {
            return new List<KeyValuePair<string, string>>()
            {
                new KeyValuePair<string, string>("AOC","AOC"),
                new KeyValuePair<string, string>("HKC","HKC"),
                new KeyValuePair<string, string>("长城","长城"),
                new KeyValuePair<string, string>("明基","明基"),
                new KeyValuePair<string, string>("三星","三星"),
                new KeyValuePair<string, string>("华硕","华硕"),
                new KeyValuePair<string, string>("飞利浦","飞利浦"),
                new KeyValuePair<string, string>("优派","优派"),
                new KeyValuePair<string, string>("其他","其他")
            };
        }
        #endregion
    }

    #region 系统枚举
    /// <summary>
    /// 系统的模块
    /// </summary>
    public enum SysModule
    {
        VACS = 1,
        FSS = 2
    }

    public enum VACSRoleType
    {
        VACSAdmin = 1,
        VACSManager = 2,
        VACSAgency = 3
    }

    public enum FSSRoleType
    {
        FSSAdmin = 4,
        FSSManager = 5,
        FSSAgency = 6
    }

    public enum UserStatus
    {
        启用 = 1,
        禁用 = -1
    }

    /// <summary>
    /// Http状态码
    /// </summary>
    public enum HttpCode
    {
        Bad_Request = 400,
        Unauthorized = 401,
        Forbidden = 403,
        Not_Found = 404,
        Internal_Server_Error = 500,
        Service_Unavailable = 503
    }

    public enum AttackType
    {
        SqlInjection = 1,
        XSS = 2
    }

    /// <summary>
    /// 定义响应状态枚举
    /// </summary>
    public enum RspCode
    {
        MVCCheckError = -99,
        CheckError = -9,

        Fail = -1,
        Unknown = 0,
        Success = 1
    }
    #endregion

    #region FSS枚举

    /// <summary>
    /// 是否参加活动
    /// </summary>
    public enum JoinActivity
    {
        参加 = 1,
        不参加 = 0
    }

    /// <summary>
    /// Pipeline订单来源
    /// </summary>
    public enum PipelineSource
    {
        ODM = 1,
        ISV = 2,
        Call = 3,
        Others = 4
    }

    /// <summary>
    /// Pipeline订单的网吧状态
    /// </summary>
    public enum PipelineICafeStatus
    {
        新开 = 1,
        更新 = 2
    }

    /// <summary>
    /// 订单购买方式
    /// </summary>
    public enum PipelinePurchaseWay
    {
        自己组装 = 1,
        网吧渠道 = 2
    }

    /// <summary>
    /// 审批状态
    /// </summary>
    public enum PipelineApproveStatus
    {
        待审核 = 0,
        已批准 = 1,
        被拒绝 = -1
    }

    /// <summary>
    /// 是否DTD
    /// </summary>
    public enum PipelineIsDtd
    {
        是 = 1,
        否 = 0
    }

    /// <summary>
    /// 沿用老系统的迁移状态，但是值都是1
    /// </summary>
    public enum MigratedStatus
    {
        未迁移 = 0,
        已迁移 = 1
    }

    /// <summary>
    /// prc_icafe_change_history表的类别标记
    /// </summary>
    public enum ChangeHistoryType
    {
        ICafeChange = 1,
        PipelineChange = 2
    }
    #endregion

    #region VACS枚举
    //store店面的stdb_stor_biz字段默认是1,2,3,4,5,6,100
    public enum StorBiz
    {
        分销 = 1,
        网吧 = 2,
        行业 = 3,
        监控 = 4,
        线上 = 5,
        直播 = 6,
        其他 = 100
    }

    //门店类别
    public enum StorType
    {
        DIY = 1,
        //OEM=2,
        LFR = 3
    }

    //店面星级
    public enum StorCatType
    {
        卓越体验店面 = 1,
        非星级 = 4,
        历史店面 = 5,
        至尊体验店面 = 6,
        优选星级店面 = 10,
        融合店面 = 16
    }

    //店面卖场
    public enum MallType
    {
        街边店 = 1,
        卖场店 = 2,
        写字间 = 3
    }

    public enum StorApproveStatus
    {
        待审核 = 0,
        已批准 = 1,
        被拒绝 = -1
    }

    public enum StorApproverType
    {
        VACSM = 1,      //店面给VACSM批的是1
        SMS = 2         //店面给SMS Intel人批的是2
                        //给VACSM审批情况 1.修改店面基本信息 2.修改店员信息 3.修改关联的MR信息
                        //给SMS审批的情况 1.新增店面 2.修改店面星级
    }
    #endregion
}
